import 'package:dio/dio.dart';
import 'package:flutterprovider/bean/user_bean.dart';

class Api {
  String pathBaidu = "http://www.baidu.com";

  Future<Userbean> login(String username) async {
    return Future.delayed(Duration(seconds: 3), () async {
      //    print(" 调用login方法  ");
      Response response = await Dio().get(pathBaidu);
//    print("请求的数据是:" + response.toString());
      return Userbean(name: "测试1", address: "深圳1", age: 20);
    });
  }
}
